<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			.e1 {
				width: 200px;
				height: 100px;
				background-color: black;
				border-radius: 400px 400px 0 0;
				position: relative;
			}
			
			.e2 {
				width: 200px;
				height: 100px;
				background-color: yellow;
				border-radius: 0 0 400px 400px;
				position: relative;
			}
			
			.sub1 {
				width: 100px;
				height: 100px;
				border-radius: 50%;
				background: yellow;
				position: absolute;
				top: 50px;
				z-index: 10;
			}
			
			.sub2 {
				width: 100px;
				height: 100px;
				border-radius: 50%;
				background: black;
				position: absolute;
				right: 0px;
				top: -50px;
			}
			
			.sub11 {
				width: 30px;
				height: 30px;
				border-radius: 50%;
				background-color: black;
				position: absolute;
				left: 35px;
				top: 35px
			}
			
			.sub21 {
				width: 30px;
				height: 30px;
				border-radius: 50%;
				background-color: yellow;
				position: absolute;
				right: 35px;
				top: 35px;
				/*z-index: 10;*/
			}
			
			.zong {
				width: 200px;
				height: 200px;
				border-radius: 50%;
				box-shadow: 0px 0px 50px #999395;
				position: absolute;
				/*left: 0px;
				 top: 0;*/
			}
			/*.cip{
			position: fixed;
		}*/
		</style>
	</head>

	<body>
		<div class="zong">
			<div class="e1">
				<div class="sub1">
					<div class="sub11">

					</div>
				</div>
			</div>
			<div class="e2">
				<div class="sub2">
					<div class="sub21">

					</div>
				</div>
			</div>
		</div>

		<script type="text/javascript">
			var l = 0;
			var t = 0;
			var lrot = 20;
			var trot = 20;
			var tj = document.querySelector(".zong");
			setInterval(function() {

				l = l + lrot;
				t = t + trot;
				tj.style.left = l + "px";
				tj.style.top = t + "px";
				if(l >= 1140) {
					lrot = -20;

				}
				if(l <= 0) {
					lrot = 20;
				}
				if(t >= 500) {
					trot = -20;

				}
				if(t <= 0) {
					trot = 20;

				}

			},100);
		</script>
	</body>

</html>